home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / var / lib / dpkg / info / python2.5.postinst < prev    next >
Encoding:
Text File  |  2007-05-02  |  1.7 KB  |  58 lines

  1. #! /bin/sh -e
  2. #
  3. # postinst script for the Debian python2.5-base package.
  4. # Written 1998 by Gregor Hoffleit <flight@debian.org>.
  5. #
  6.  
  7. # remove unconditionally
  8. update-alternatives --remove python /usr/bin/python2.5 || true
  9.  
  10. if [ "$1" = configure ]; then
  11.     (
  12.     cd /usr/lib/python2.5
  13.     files=$(dpkg -L python2.5 | sed -n '/\.py$/s,^/usr/lib/python2.5/,,p')
  14.     /usr/bin/python2.5 /usr/lib/python2.5/py_compile.py $files
  15.     if grep -sq '^byte-compile[^#]*optimize' /etc/python/debian_config; then
  16.         /usr/bin/python2.5 -O /usr/lib/python2.5/py_compile.py $files
  17.     fi
  18.     )
  19. fi
  20.  
  21. case "$1" in
  22.     configure|abort-upgrade|abort-remove|abort-deconfigure)
  23.  
  24.         # Create empty directories in /usr/local
  25.         if [ ! -e /usr/local/lib/python2.5 ]; then
  26.             mkdir -p /usr/local/lib/python2.5 2> /dev/null || true
  27.             chmod 2775 /usr/local/lib/python2.5 2> /dev/null || true
  28.             chown root:staff /usr/local/lib/python2.5 2> /dev/null || true
  29.         fi
  30.         if [ ! -e /usr/local/lib/python2.5/site-packages ]; then
  31.             mkdir -p /usr/local/lib/python2.5/site-packages 2> /dev/null || true
  32.             chmod 2775 /usr/local/lib/python2.5/site-packages 2> /dev/null || true
  33.             chown root:staff /usr/local/lib/python2.5/site-packages 2> /dev/null || true
  34.         fi
  35.     ;;
  36.  
  37.     *)
  38.         echo "postinst called with unknown argument \`$1'" >&2
  39.         exit 1
  40.     ;;
  41. esac
  42.  
  43. ldconfig
  44.  
  45. # Automatically added by dh_installmenu
  46. if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
  47.     update-menus
  48. fi
  49. # End automatically added section
  50. # Automatically added by dh_desktop
  51. if [ "$1" = "configure" ] && which update-desktop-database >/dev/null 2>&1 ; then
  52.     update-desktop-database -q
  53. fi
  54. # End automatically added section
  55.  
  56.  
  57. exit 0
  58.